<?php
/* @var $this BoatController */
/* @var $model Boat */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'boat-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'boatType_id'); ?>
		<?php echo $form->dropDownList($model, 'boatType_id',
		            CHtml::listData(
                        BoatType::model()->findAll(),
                        'id',
                        'name'
                    )
		        ); ?>
		<?php echo $form->error($model,'boatType_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'club_id'); ?>
		<?php echo $form->dropDownList($model, 'club_id',
		            CHtml::listData(
                        Club::model()->findAll(),
                        'id',
                        'name'
                    )
		        ); ?>
		<?php echo $form->error($model,'club_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'registration'); ?>
		<?php echo $form->textField($model,'registration',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'registration'); ?>
	</div>

	<div class="row buttons">
	    <?php echo $form->hiddenField($model,'updated', array('value', date('Y-m-d h:i:s'))); ?>
	    <?php echo $form->hiddenField($model,'created', array('value', date('Y-m-d h:i:s'))); ?>
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->